package com.ssm.zhihu_ssm.dao;

import com.ssm.zhihu_ssm.entity.User;
import com.ssm.zhihu_ssm.entity.UserMessage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserDAO {
    List<User> getAllUser();
    User loginUser(String phone);
    void applyUser(User user);
    User findUserMessage(int id);
    int findId(String phone);
    boolean insertUserMessage(UserMessage userMessage);
    boolean updataUserMessage(UserMessage userMessage);

    UserMessage findUsernickName(String nickname);

    boolean setimg(UserMessage userMessage);


    //管理员部分
    User loginAdmin(String phone);
    boolean delectUser(int id);
    boolean setpassword(User user);
}
